package com.wnxy.be_emp_manager.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Classname Result
 * @Description :
 * @Date 2020/12/26 14:47
 * @Created by Yeheng
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVO {
    private Object data;
    private Integer state;
    private String msg;

    public ResultVO(String msg, Integer state) {
        this.msg = msg;
        this.state = state;
    }

    public static ResultVO success(Object data){
        ResultVO result = new ResultVO();
        result.setMsg("操作成功");
        result.setState(200);
        result.setData(data);
        return result;
    }

}
